package com.concerneyes.mine.TabActivity;

import android.os.Bundle;
import android.widget.ListView;

import com.concerneyes.R;
import com.concerneyes.mine.adapter.MyDepositAdapter;
import com.concerneyes.mine.model.MyDepositModel;

import java.util.ArrayList;
import java.util.List;

import common.AbsActivity;
import util.ToastHelper;

/**
 * 押金详情
 */

public class MyDeposit extends AbsActivity implements MyDepositAdapter.OnDepositClick {
    private ListView lvDeposit;
    private MyDepositAdapter adapter;

    @Override
    protected void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(R.layout.activity_mydeposit);
        setTitle(R.string.yajin_detail);
        initView();
    }

    private void initView() {
        lvDeposit = (ListView) findViewById(R.id.lv_deposit);
        adapter = new MyDepositAdapter(this, this);
        lvDeposit.setAdapter(adapter);
        MyDepositModel model = new MyDepositModel();
        model.setName("就好");
        model.setDay1("5");
        model.setDay2("525");
        model.setDay3("62");
        List<MyDepositModel> models = new ArrayList<>();

        for (int i = 0; i < 5; i++) {
            models.add(model);
        }
        adapter.addDatas(models);
    }

    @Override
    public void onGlassesClick(int position) {
        ToastHelper.getInstance()._toast(""+position);
    }
}
